/**
 * 
 */
package com.javaking.clanteam.studentutils.courses;

import java.util.List;
import java.util.Map;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.SimpleAdapter;
import android.widget.TextView;

import com.javaking.clanteam.studentutils.R;

/**
 * @author scott
 *
 */
public class TimesAdapter extends SimpleAdapter {

	
	private static final int[] to = {R.id.timeString};
	private static final String[] from = {"timeString"};
	

	public TimesAdapter(Context context, List<? extends Map<String,?>> data) {
		super(context,data,(Integer) R.layout.fragment_times_listitem,from,to);
	}
	
	/* (non-Javadoc)
	 * @see android.widget.SimpleAdapter#getView(int, android.view.View, android.view.ViewGroup)
	 */
	@Override
	public View getView(int position, View convertView, ViewGroup parent) {		
		View v = super.getView(position, convertView, parent);
		((TextView)v.findViewById(R.id.itemNumber)).setText(String.valueOf(position+1)+")");
		return v;
	}
	
}
